#include "ufcs_driver.h"
#include "usart.h"
uint8_t ufcs_recv_idx = 0;
uint8_t ufcs_recv_buff[128] = { 0 };

void UFCS_CMD_Proc(uint8_t *data)
{
	switch(data[3])
	{
		case 0x00:
			data[4] = UFCS_Shake_Hand();
			data[5] = 0;
			CMD_Response(data);
			break;
		case 0x01:
            data[4] = 0;
			data[5] = UFCS_Get_Output_Cap(data + 6);
			CMD_Response(data);
			break;
		case 0x02:
			data[4] = UFCS_Request(data[6], data[7]*256 + data[8], data[9]*256 + data[10]);
            data[5] = 0;
			CMD_Response(data);
			break;
		case 0x03:
            data[4] = 0;
			data[5] = Get_Source_Info(data + 6);
			CMD_Response(data);
			break;
		case 0x0F:
			data[4] = UFCS_Exit();
            data[5] = 0;
			CMD_Response(data);
			break;
		default:
			break;
	}
}

